<!--
 * @Author: lmk
 * @Date: 2021-09-29 09:48:57
 * @LastEditTime: 2021-11-17 12:07:46
 * @LastEditors: lmk
 * @Description: 
-->
<template>
  <view :class="currentTheme">
    <a-nabbar name="钱包" />
    <view class="u-text-center waller">
      <text class="money-title text-bold">账号余额</text>
      <view>
        <u-icon
          name="icon-qian"
          custom-prefix="custom-icon"
          :color="currentThemeObj.primary"
          size="56"
        ></u-icon>
        <text class="price">{{ balance }}</text>
      </view>
    </view>
    <view class="u-margin-bottom-34" style="margin-top: 207rpx">
			<view class="curent-padding">
				<item-btn @click="Withdrawal" :height="88" width="100%">
					<text class="u-font-28">提现</text>
				</item-btn>
			</view>
    </view>
    <view class="curent-padding" style="margin-bottom: 242rpx">
      <item-btn @click="Account" type="plain" :height="88" width="100%">
       <text class="content-desc-item u-font-28">账户信息</text>
      </item-btn>
    </view>
    <view @click="record" class="record">提现记录</view>
  </view>
</template>

<script>
import { getDetail } from "@/api/crud.js";
export default {
  name: "index",
  data() {
    return {
      balance: 0,
    };
  },
  onShow() {
    //获取用户余额
    getDetail("", "user", "shopApi", "getUserBalance").then((res) => {
      this.balance = res.balance;
    });
  },
  methods: {
    // 提现
    Withdrawal() {
      this.$u.route({
        url: "/pagesB/wallet/Withdrawal",
      });
    },
    // 提现记录
    record() {
      this.$u.route({
        url: "/pagesB/wallet/record",
      });
    },
    // 账户信息
    Account() {
      this.$u.route({
        url: "/pagesB/wallet/account",
      });
    },
  },
};
</script>

<style scoped lang="scss">
.waller {
  .money-title {
    color: var(--title-color);
    display: block;
    margin-top: 207rpx;
    font-size: 36rpx;
    margin-bottom: 72rpx;
  }
  .price {
    font-size: 100rpx;
    color: var(--theme-color);
    span {
      font-size: 70rpx;
    }
    margin-left: 30rpx;
    vertical-align: sub;
  }
}
.record {
  text-align: center;
  color: var(--theme-color);
  // margin: 242rpx 0;
}
.curent-padding{
	padding:0 92rpx;
}
</style>